/*
 * (C) 2012	Sheng Yi
 * Use signals mask set and print them
 */
#include "apue.h"

int main()
{
	sigset_t sigset, sigset_now;

	/* Initiate the sigset */
	sigemptyset(&sigset);

	/* add some signal to mask */
	sigaddset(&sigset, SIGUSR1);
	sigaddset(&sigset, SIGALRM);

	/* get sigset using now */
	pr_mask("before set mask, the orignal mask is:");

	/* add my mask with it */
	sigprocmask(SIG_BLOCK, &sigset, NULL);

	/* now the mask signal set is */
	pr_mask("after set my mask, the mask now is:");

	exit(0);
}
